#!/bin/bash

:<<eof

1. 基础语法

for((初始值;循环控制条件;变量变化))
do
	...
done


for variableName in value1 value2 value3...
do
	......
done

eof


# 命令出错会停止执行
set -e
# 打印每条执行的命令
set -x

s=0
for((i=0;i<=100;i++))
do
		s=$[$s+$i]
done

echo $s


for item in $@
do
	echo $item
done

echo "=================="

for item in "$*"
do
	echo $item
done

set +x
